package com.ning.ems.enums;

/**
 * @author Ning 242741154@qq.com
 * @date 2020/6/3 15:33
 */
public enum Province {
    P11(11, "北京市"), P12(12, "天津市"),
    P13(13, "河北省"), P14(14, "山西省"),
    P15(15, "内蒙古自治区"),
    P21(16, "辽宁省"), P22(22, "吉林省"),
    P23(23, "黑龙江省"),
    P31(31, "上海市"), P32(32, "江苏省"),
    P33(33, "浙江省"), P34(34, "安徽省"),
    P35(35, "福建省"), P36(36, "江西省"),
    P37(37, "山东省"),
    P41(41, "河南省"), P42(42, "湖北省"),
    P43(43, "湖南省"), P44(44, "广东省"),
    P45(45, "广西壮族自治区"), P46(46, "海南省"),
    P50(50, "重庆市"), P51(51, "四川省"),
    P52(52, "贵州省"), P53(53, "云南省"),
    P54(54, "西藏自治区"),
    P61(61, "陕西省"), P62(62, "甘肃省"),
    P63(63, "青海省"), P64(64, "宁夏回族自治区"),
    P65(65, "新疆维吾尔自治区"),
    P71(71, "台湾省"),
    P81(81, "香港特别行政区"), P82(82, "澳门特别行政区");

    int id;
    String desc;

    Province(int id, String desc) {
        this.id = id;
        this.desc = desc;
    }

    public static String descOf(int id) {
        for (Province value : values()) {
            if (value.id == id) {
                return value.desc;
            }
        }
        return "";
    }

}
